using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Domains
{
    /// <summary>
    /// <para>Remove Domain From Field</para>
    /// <para>Removes an attribute domain association from a feature class or table field.</para>
    /// <para>从要素类或表字段中移除属性域关联。</para>
    /// </summary>    
    [DisplayName("Remove Domain From Field")]
    public class RemoveDomainFromField : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public RemoveDomainFromField()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_table">
        /// <para>Input Table</para>
        /// <para>The input table containing the attribute domain that will be removed.</para>
        /// <para>包含将要移除的属性域的输入表。</para>
        /// </param>
        /// <param name="_field_name">
        /// <para>Field Name</para>
        /// <para>The field that will no longer be associated with an attribute domain.</para>
        /// <para>将不再与属性域关联的字段。</para>
        /// </param>
        public RemoveDomainFromField(object _in_table, object _field_name)
        {
            this._in_table = _in_table;
            this._field_name = _field_name;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Remove Domain From Field";

        public override string CallName => "management.RemoveDomainFromField";

        public override List<string> AcceptEnvironments => ["autoCommit", "workspace"];

        public override object[] ParameterInfo => [_in_table, _field_name, _subtype_code, _out_table];

        /// <summary>
        /// <para>Input Table</para>
        /// <para>The input table containing the attribute domain that will be removed.</para>
        /// <para>包含将要移除的属性域的输入表。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Table")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_table { get; set; }


        /// <summary>
        /// <para>Field Name</para>
        /// <para>The field that will no longer be associated with an attribute domain.</para>
        /// <para>将不再与属性域关联的字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Field Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _field_name { get; set; }


        /// <summary>
        /// <para>Subtype</para>
        /// <para>The subtype code(s) that will no longer be associated with an attribute domain.</para>
        /// <para>将不再与属性域关联的子类型代码。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Subtype")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _subtype_code { get; set; } = null;


        /// <summary>
        /// <para>Updated Input Table</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Input Table")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_table { get; set; }


        public RemoveDomainFromField SetEnv(int? autoCommit = null, object workspace = null)
        {
            base.SetEnv(autoCommit: autoCommit, workspace: workspace);
            return this;
        }

    }

}